New patch. Fix tests
authorKan-Ru Chen <koster@debian.org>
Sat, 17 Dec 2011 10:24:18 +0000 (18:24 +0800)
committerKan-Ru Chen <koster@debian.org>
Sat, 17 Dec 2011 10:27:11 +0000 (18:27 +0800)
debian/changelog
debian/patches/fix-new-test-cases.patch [new file with mode: 0644]
debian/patches/series

index 808027b929e921918687df2d50ad21d68a76555b..bf8d94326d3a090fec5a798b436f50d75bcb21eb 100644 (file)
@@ -3,6 +3,7 @@ opencc (0.3.0-1) unstable; urgency=low
   * New upstream release
   * Remove autotools-dev and quilt from Build-Depends
   * debian/patches/fix-big-endian-build.diff: merged upstream
+  * debian/patches/fix-new-test-cases.patch: New patch.
 
  -- Kan-Ru Chen <koster@debian.org>  Sat, 17 Dec 2011 16:41:49 +0800
 
diff --git a/debian/patches/fix-new-test-cases.patch b/debian/patches/fix-new-test-cases.patch
new file mode 100644 (file)
index 0000000..c9c73de
--- /dev/null
@@ -0,0 +1,29 @@
+Description: Fix new test cases
+ Copy nedded dict files to ${PROJECT_BINARY_DIR}/data for tests.
+Author: Kan-Ru Chen <koster@debian.org>
+
+--- a/data/CMakeLists.txt
++++ b/data/CMakeLists.txt
+@@ -92,4 +92,10 @@
+               ${CHINA_DICT_FILES}
+       DESTINATION
+               ${DIR_SHARE_OPENCC}
+-)
+\ No newline at end of file
++)
++
++if (BUILD_TESTING)
++      foreach (DICT ${TAIWAN_DICT_FILES} ${CHINA_DICT_FILES})
++              configure_file(${DICT} ${PROJECT_BINARY_DIR}/data COPYONLY)
++      endforeach (DICT)
++endif (BUILD_TESTING)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,6 +20,7 @@
+ cmake_minimum_required(VERSION 2.8)
+ set (PACKAGE_NAME opencc)
+ project (${PACKAGE_NAME} C)
++include (CTest)
+ enable_testing()
+ ######## Package information
index 8b137891791fe96927ad78e64b0aad7bded08bdc..fb650d8ee63c2c3098d80da6a96de66e438700b5 100644 (file)
@@ -1 +1,2 @@
 
+fix-new-test-cases.patch